import Mock from "mockjs";

let List = [];
let userList = [];
export default {
  getStatisticalDate: () => {
    for (let i = 0; i < 7; i++) {
      List.push(
        Mock.mock({
          todayAdd: Mock.Random.float(100, 8000, 0, 2),
          mothAdd: Mock.Random.float(100, 8000, 0, 2),
          totalAdd: Mock.Random.float(100, 8000, 0, 2),
          allAdd: Mock.Random.float(100, 8000, 0, 2)
        })
      );
      userList.push(
        Mock.mock({
          admin: Mock.Random.integer(10, 200),
          customer: Mock.Random.integer(10, 200),
          produer: Mock.Random.integer(10, 200),
          ctssff: Mock.Random.integer(10, 200)
        })
      );
    }
    return {
      code: 20000,
      data: {
        shopCart: [
          {
            name: "神龙团队",
            todayAdd: Mock.Random.integer(1000, 10000),
            mothAdd: Mock.Random.integer(1000, 10000),
            totalAdd: Mock.Random.integer(1000, 10000)
          },
          {
            name: "猛虎团队",
            todayAdd: Mock.Random.integer(1000, 10000),
            mothAdd: Mock.Random.integer(1000, 10000),
            totalAdd: Mock.Random.integer(1000, 10000)
          },
          {
            name: "凤凰团队",
            todayAdd: Mock.Random.integer(1000, 10000),
            mothAdd: Mock.Random.integer(1000, 10000),
            totalAdd: Mock.Random.integer(1000, 10000)
          },
          {
            name: "金牛团队",
            todayAdd: Mock.Random.integer(1000, 10000),
            mothAdd: Mock.Random.integer(1000, 10000),
            totalAdd: Mock.Random.integer(1000, 10000)
          },
          {
            name: "神雕团队",
            todayAdd: Mock.Random.integer(1000, 10000),
            mothAdd: Mock.Random.integer(1000, 10000),
            totalAdd: Mock.Random.integer(1000, 10000)
          },
          {
            name: "李小龙武打团队",
            todayAdd: Mock.Random.integer(1000, 10000),
            mothAdd: Mock.Random.integer(1000, 10000),
            totalAdd: Mock.Random.integer(1000, 10000)
          }
        ],
        producerData: List,
        date: [
          "20200614",
          "20200615",
          "20200616",
          "20200617",
          "20200618",
          "20200619"
        ],
        registryData: userList,
        rdate: ["一月", "二月", "三月", "四月", "五月", "六月"],
        userData: [
          { name: "admin", value: 111 },
          { name: "custmoer", value: 888 },
          { name: "ctssff", value: 243 },
          { name: "producer", value: 456 }
        ],
        userList: ["admin", "custmoer", "ctssff", "producer"]
      }
    };
  }
};
